function testFn(fn: Function) {
  const logMsg = (type: "start" | "end") => {
    const halfLine = (type === "start" ? ">" : "<").repeat(20);
    const msg = `\n${halfLine} ${fn.name} ${type} ${halfLine}\n`;
    console.log(msg);
  };
  return function (...args: any[]) {
    logMsg("start");
    const result = fn(...args);
    logMsg("end");
    return result;
  };
}

export { testFn };
